//
//  LAGGeometry.h
//  LAMapBasicDemo
//
//  Created by 罗亮富 on 2017/10/15.
//  Copyright © 2017年 2Bulu. All rights reserved.
//

//#warning use new

#ifndef LAGGemotry_h
#define LAGGemotry_h

#include "LAGGeometryTypes.h"


CLLocationCoordinate2D CLLocationCoordinate2DFromPointDataType(LocationPointType point);

double get_distanceAccountAltitude(double lat1, double lng1,double alt1, double lat2, double lng2,double alt2);
double get_distance(double lat1, double lng1, double lat2, double lng2);

extern double calculateDistanceBetweenPoints(LocationPointType p1, LocationPointType p2, bool accountAltitude);
extern double calculateDistanceBetweenCoordinates(CLLocationCoordinate2D p1, CLLocationCoordinate2D p2);

//判断两点之间的连线是否穿过一块区域
extern bool LineCorssOverMapRect(MKMapRect rect, MKMapPoint linePoint1,MKMapPoint linePoint2);
extern bool lineCrossOverRectRegion(double rectOriginalX,double rectOriginalY,double rectWidth, double rectHeight, double p1x, double p1y, double p2x,double p2y);

#ifdef __OBJC__
extern double calculateDistanceBetweenLocations(CLLocation *p1, CLLocation *p2, bool accountAltitude);
CLLocation *objcLocationFromPoint(LocationPointType point);
inline MKMapPoint LAMapPointFromPointDataType(LocationPointType point);

#endif

#endif /* LAGGemotry_h */


